<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <meta name="renderer" content="webkit" />

  <!-- <title>丘比特社区</title> -->
  <meta id="i18n_pagename" content="community-index-common" />

  <title class="i18n" name="common-title"></title>
  <link rel="stylesheet" href="css/bootstrap.min.css" />
  <link rel="stylesheet" href="css/base.css" />
  <link rel="stylesheet" href="css/style.css" />
  <link rel="stylesheet" href="css/mobie.css" />
  <link rel="stylesheet" href="css/community.css" />

  <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>

<body>
  <div class="community">
    <div class="application">
      <nav class="navbar cupid_head">
        <div class="head_bar">
          <div class="main_center">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" aria-expanded="false">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              <div class="navbar-right langu">
                <a id="language-content" class="language"></a>
                <ul class="language_list" style="display: none;">
                  <li id="btnZh" style="cursor:pointer" class="language_list_one">
                    简体中文
                  </li>
                  <li id="btnEn" style="cursor:pointer" class="language_list_one">
                    English
                  </li>
                </ul>
              </div>
              <a class="navbar-brand" href="index.html"><img src="images/logo.png" /></a>
            </div>

            <div class="collapse navbar-collapse pc_head">
              <div class="row">
                <div class="nav navbar-nav logo">
                  <a href="index.html"><img src="images/logo.png" /></a>
                </div>
                <div class="navbar-right langu">
                  <a id="language-content" class="language"></a>
                  <ul class="language_list" style="display: none;">
                    <li id="btnZh" style="cursor:pointer" class="language_list_one">
                      简体中文
                    </li>
                    <li id="btnEn" style="cursor:pointer" class="language_list_one">
                      English
                    </li>
                  </ul>
                </div>
                <ul class="nav navbar-nav navbar-right nav_list hidden-sm">
                  <li>
                    <a href="index.html" class="i18n " name="common-index"></a>
                  </li>
                  <li>
                    <a href="application.html" class="i18n " name="common-application"></a>
                  </li>
                  <li>
                    <a href="dapp.html" class="i18n" name="common-dapp"></a>
                  </li>
                  <li>
                    <a href="love_machine.html" class="i18n" name="common-love-machine"></a>
                  </li>
                  <li>
                    <a href="technology.html" class="i18n" name="common-technology"></a>
                  </li>
                  <li>
                    <a href="economies.html" class="i18n" name="common-economies"></a>
                  </li>
                  <li>
                    <a href="community.html" class="i18n active" name="common-community"></a>
                  </li>
                  <li>
                    <a href="fund.html" class="i18n" name="common-fund"></a>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>

        <div class="nav_slider_mask" style="display: none;">
          <ul class="nav_slider_list">
            <li class="nav_slider_one">
              <a href="index.html" class="i18n " name="common-index"></a>
            </li>
            <li class="nav_slider_one">
              <a href="application.html" class="i18n" name="common-application"></a>
            </li>
            <li class="nav_slider_one">
              <a href="dapp.html" class="i18n" name="common-dapp"></a>
            </li>
            <li class="nav_slider_one">
              <a href="love_machine.html" class="i18n" name="common-love-machine"></a>
            </li>
            <li class="nav_slider_one">
              <a href="technology.html" class="i18n" name="common-technology"></a>
            </li>
            <li class="nav_slider_one">
              <a href="economies.html" class="i18n" name="common-economies"></a>
            </li>
            <li class="nav_slider_one">
              <a href="community.html" class="i18n active" name="common-community"></a>
            </li>
            <li class="nav_slider_one">
              <a href="fund.html" class="i18n" name="common-fund"></a>
            </li>
          </ul>
        </div>
      </nav>
      <!-- 头部 -->
      <div class="top_content">
        <div class="container">
          <div class="i18n top_text" name='community-title1'>
            <!-- 社区 -->
          </div>
        </div>
      </div>
      <div class="community_list">
        <!-- 最新公告 -->
        <div class="media">
          <div class="container">
            <div class="i18n section_title" name='common-footer-label3'>
              <!-- 最新公告 -->
            </div>
            <div class="report_list clearfix" id="last-notice">
              <!-- 动态部分 -->
              <!-- <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
              <div class="report_one">
                <div class="report_img">
                  <img src="images/media_4.png" alt="">
                </div>
                <div class="report_detail">
                  <p>丘比特在北京鸟巢举行全球发布会</p>
                  <p>2018年8月8日</p>
                </div>
              </div>
            </div>
            <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
              <div class="report_one">
                <div class="report_img">
                  <img src="images/media_5.png" alt="">
                </div>
                <div class="report_detail">
                  <p>区块链创造爱情表达新体验</p>
                  <p>2018年8月9日</p>
                </div>
              </div>
            </div>
            <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
              <div class="report_one">
                <div class="report_img">
                  <img src="images/media_6.png" alt="">
                </div>
                <div class="report_detail">
                  <p>丘比特创始人李晶: 区块链创造爱情表达新体验</p>
                  <p>2018年11月4日</p>
                </div>
              </div>
            </div> -->
            </div>
            <div class="i18n more" id="notice-more" name='home-more'>
              <!-- 更多 -->
            </div>
          </div>
        </div>

        <!-- 媒体报道 -->
        <div class="media media_bg">
          <div class="container">
            <div class="i18n section_title" name='home-section8-title'>
              <!-- 媒体报道 -->
            </div>
            <div class="report_list clearfix" id="information">
              <!-- <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
              <div class="report_one">
                <div class="report_img">
                  <img src="images/media_1.png" alt="">
                </div>
                <div class="report_detail">
                  <p>丘比特在北京鸟巢举行全球发布会</p>
                  <p>2018年8月8日</p>
                </div>
              </div>
            </div>
            <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
              <div class="report_one">
                <div class="report_img">
                  <img src="images/media_2.png" alt="">
                </div>
                <div class="report_detail">
                  <p>区块链创造爱情表达新体验</p>
                  <p>2018年8月9日</p>
                </div>
              </div>
            </div>
            <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">
              <div class="report_one">
                <div class="report_img">
                  <img src="images/media_3.png" alt="">
                </div>
                <div class="report_detail">
                  <p>丘比特创始人李晶: 区块链创造爱情表达新体验</p>
                  <p>2018年11月4日</p>
                </div>
              </div>
            </div> -->
            </div>
            <div class="i18n more" id="information-more" name='home-more'>
              <!-- 更多 -->
            </div>
          </div>
        </div>

        <!-- 社区网络 -->
        <div class="media">
          <div class="container">
            <div class="i18n section_title" name='common-network'>
              <!-- 社区网络 -->
            </div>
            <div class="community_network">
              <div class="network_item">
                <div class="network_icon">
                  <img src="images/network_1.png" alt="" />
                </div>
                <div class="network_text">Telegram</div>
              </div>
              <div class="network_item">
                <div class="network_icon">
                  <img src="images/network_2.png" alt="" />
                </div>
                <div class="network_text">Facebook</div>
              </div>
              <div class="network_item">
                <div class="network_icon">
                  <img src="images/network_3.png" alt="" />
                </div>
                <div class="network_text">Twitter</div>
              </div>
              <div class="network_item">
                <div class="network_icon">
                  <img src="images/network_4.png" alt="" />
                </div>
                <div class="network_text">Weibo</div>
              </div>
              <div class="network_item">
                <div class="network_icon">
                  <img src="images/network_5.png" alt="" />
                </div>
                <div class="network_text">Wechat</div>
              </div>
            </div>
            <div class="community_detail">
              <p class="i18n" name='community-detail1'>
                <!-- 加入丘比特，链接爱情共识， -->
              </p>
              <p class="i18n" name='community-detai2'>
                <!-- 凝聚节点力量，全面提升人类幸福感！ -->
              </p>
            </div>
            <div class="i18n join_btn base_btn" name='community-base'>
              <!-- 加入社区 -->
            </div>
          </div>
        </div>
      </div>
      <!-- 底部 -->
      <footer>
        <div class="container clearfix">
          <div class="footer_top  col-xs-12 col-sm-12 col-md-6 col-lg-6">
            <div class="footer_list  col-xs-4 col-sm-4 col-md-4 col-lg-4">
              <div class="i18n footer_tit" name="common-footer-label1">
                <!-- 社群治理 -->
              </div>
              <a href="proposals.html" class="i18n list_tit" name="common-footer-label2">
                <!-- 丘比特改进提案 -->
              </a>
              <a href="latest_notice.html" class="i18n list_tit" name="common-footer-label3">
                <!-- 最新公告 -->
              </a>
            </div>
            <div class="footer_list  col-xs-4 col-sm-4 col-md-4 col-lg-4">
              <div class="i18n footer_tit" name="common-footer-label4">
                <!-- 关于 -->
              </div>
              <a href="team_members.html" class="i18n list_tit" name="common-footer-label5">
                <!-- 团队 -->
              </a>
              <a href="contactus.html" class="i18n list_tit" name="common-footer-label6">
                <!-- 联系我们 -->
              </a>
            </div>
            <div class="footer_list  col-xs-4 col-sm-4 col-md-4 col-lg-4">
              <div class="i18n footer_tit" name="common-footer-label7">
                <!-- 服务条款 -->
              </div>
              <a href="copyright.html" class="i18n list_tit" name="common-footer-label8">
                <!-- 版权声明 -->
              </a>
              <a href="disclaimer.html" class="i18n list_tit" name="common-footer-label9">
                <!-- 免责声明 -->
              </a>
            </div>
          </div>
          <div class="footer_center  col-xs-12 col-sm-12 col-md-6 col-lg-6">
            <div class="i18n footer_center_tit" name="common-footer-label10">
              <!-- 关注我们 -->
            </div>
            <div class="footer_center_main clearfix">
              <div id="Telegram" class="footer_center_one fl">
                <div class="footer_center_icon">
                  <img src="images/network_1.png" alt="" />
                </div>
                <div class="footer_center_text">Telegram</div>
              </div>
              <div id="Facebook" class="footer_center_one fl">
                <div class="footer_center_icon">
                  <img src="images/network_2.png" alt="" />
                </div>
                <div class="footer_center_text">Facebook</div>
              </div>
              <div id="Twitter" class="footer_center_one fl">
                <div class="footer_center_icon">
                  <img src="images/network_3.png" alt="" />
                </div>
                <div class="footer_center_text">Twitter</div>
              </div>
              <div id="Weibo" class="footer_center_one fl">
                <div class="footer_center_icon">
                  <img src="images/network_4.png" alt="" />
                </div>
                <div class="footer_center_text">Weibo
                </div>
              </div>
              <!-- <div id="Wechat" class="footer_center_one fl">
                <div class="footer_center_icon">
                  <img src="images/network_5.png" alt="" />
                </div>
                <div class="footer_center_text">Wechat</div>
              </div> -->
            </div>
          </div>
          <div class="i18n footer_bootom" name="common-footer-bootom">
            <!-- 版权所有@1692018-2020 cbit.love保留所有权利
                  联系我们：global@cbit.love -->
          </div>
        </div>
      </footer>
    </div>

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="js/jquery-1.12.4.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.cookie.js"></script>
    <!-- 加载语言包文件 -->
    <script src="js/jquery.i18n.properties.js"></script>
    <script src="js/language.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>

    <script>
      function to_detail(postUrl, id) {
        if (postUrl.indexOf('news_detail.html?id=') != -1 || checkRate(postUrl)) {
          window.location.href = 'news_detail.html?id=' + id;
        } else {
          window.location.href = postUrl;
        }
      }

      function checkRate(input) {
        var re = /^[0-9]+.?[0-9]*/; //判断字符串是否为数字//判断正整数/[1−9]+[0−9]∗]∗/;//判断字符串是否为数字//判断正整数/[1−9]+[0−9]∗]∗/
        if (!re.test(input)) {
          return false;
        }
        return true;
      }

      function getHtml(list) {
        let html = '';
        $.each(list, function (i, item) {
          if (i >= 3) {
            return;
          }
          var postUrl = item.postUrl;
          console.log(postUrl)
          // console.log(JSON.stringify(item))
          postUrl = postUrl.replace(/[\r\n]/g, "");
          html +=
            "<div class='col-xs-6 col-sm-4 col-md-4 col-lg-4' style='cursor:pointer' onclick=\"to_detail('" +
            postUrl + "'," +
            item.postId + ")\">"
          html += ' <div class="report_one"><div class="report_img" style="background-image: url(' +
            item.postThumbnail + ')"> ';
          // html += ' <img src="' + item.postThumbnail + '" />';
          html += '</div><div class="report_detail"> <p>';
          if (true) {
            html += item.postTitle + '';
          }
          html += '</p> <p>';
          let date = moment(item.postDate, 'YYYY-MM-DD HH:mm:ss').format(
            'YYYY年MM月DD日'
          );
          html += date;
          html += '</p></div></div></div>';
          // html += item.postSummary;
          // html += '</div></div></li >';
        });
        // $('#ulHtml').html(html);
        return html;
      }
      $(function () {
        $('.report_img').height($('.report_img').width() * 120 / 218);
        $('.join_btn').click(function () {
          window.location.href = 'join_community.html';
        })
        // 更多
        $('#notice-more').click(function () {
          window.location.href = 'latest_notice.html';
        });
        $('#information-more').click(function () {
          window.location.href = 'latest_information.html';
        });
        // do something
        // 最新公告
        $.ajax({
          type: 'GET',
          url: 'api/archives/notice/page/1',
          headers: {
            token: '9f47733dfb9075387f8705dbc7e93199'
          },
          dataType: 'json',
          success: function (msg) {
            console.log(msg);
            let totalPages = msg.result.totalPages;
            if (msg.result) {
              let html = getHtml(msg.result.content);
              $('#last-notice').html(html);
            }
          }
        });
        // 媒体资讯
        $.ajax({
          type: 'GET',
          url: 'api/archives/information/page/1',
          headers: {
            token: '9f47733dfb9075387f8705dbc7e93199'
          },
          dataType: 'json',
          success: function (msg) {
            console.log(msg);
            let totalPages = msg.result.totalPages;
            if (msg.result) {
              let html = getHtml(msg.result.content);
              $('#information').html(html);
              $('.report_img').height($('.report_img').width() * 120 / 218);
            }
          }
        });
      });
      $('.navbar-toggle').click(function () {
        $('.nav_slider_mask').toggle();
      });
    </script>
</body>

</html>